<?php
/**
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

$db =& JFactory::getDBO();
$q = "SELECT * FROM #__vm_category WHERE `category_publish` = 'Y'";
$db->setQuery($q);
$category_menu_top = $db->loadObjectList();
/*echo "<pre>";
var_dump($category_menu_top);
echo "</pre>";*/
$sub_menu = '<ul class="ul-sub">';
$sub_menu .= '<img class="arrow-up" src="'.JURI::base().'templates/rhuk_milkyway/images/arrow_up.png" alt=""/>';
for($i = 0;$i <count($category_menu_top);$i++){
	$sub_menu .= 	'<li><a href="index.php?option=com_virtuemart&page=shop.list&category_id='.$category_menu_top[$i]->category_id.'">'.$category_menu_top[$i]->category_name.'</a><img src="'.JURI::base().'components/com_virtuemart/shop_image/category/'.$category_menu_top[$i]->category_thumb_image.'" width="173" height="152" alt=""/></li>';
}
$sub_menu .='</ul>';

$mylang = &JFactory::getLanguage();
//var_dump($mylang);
$langtag = $mylang->get('tag');
//echo $langtag;

$jconf = new JConfig();
/*echo "<pre>";
var_dump($jconf);
echo "</pre>";*/
$my_footer_info = $jconf->MetaDesc;


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<link href="<?php echo JURI::base(); ?>templates/rhuk_milkyway/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo JURI::base(); ?>templates/rhuk_milkyway/js/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="<?php echo JURI::base(); ?>templates/rhuk_milkyway/js/webwidget_slideshow_dot.js"></script>

<link rel="stylesheet" href="<?php echo JURI::base();?>templates/rhuk_milkyway/css/picture-slides.css" type="text/css"/>
<script src="<?php echo JURI::base();?>templates/rhuk_milkyway/js/jqzoom.pack.1.0.1.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo JURI::base();?>templates/rhuk_milkyway/css/jqzoom.css" type="text/css" />
<script src="<?php echo JURI::base();?>templates/rhuk_milkyway/js/jquery.prettyPhoto.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo JURI::base();?>templates/rhuk_milkyway/css/prettyPhoto.css" type="text/css" />
<script type="text/javascript" src="<?php echo JURI::base()."templates/rhuk_milkyway/js/jquery.plugin.mask.js"?>"></script>
<!-- Attach our CSS -->
<link rel="stylesheet" href="<?php echo JURI::base();?>templates/rhuk_milkyway/css/reveal.css"/>	
<!-- Attach necessary scripts -->
<script type="text/javascript" src="<?php echo JURI::base();?>templates/rhuk_milkyway/js/jquery.reveal.js"></script>
<script type="text/javascript" src="<?php echo JURI::base(); ?>/templates/rhuk_milkyway/js/jquery_ui/js/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		//jQuery('#mycarousel').jcarousel();
		jQuery(".menu").attr("class","nav");
		jQuery(".nav li a").attr("class","nav");
		var collection_html = jQuery(".item54").html();
		var sub_menu = '<?php echo $sub_menu ?>';
		collection_html += sub_menu;
		jQuery(".item54").html(collection_html);
		
		close_popup=function(){     
			jQuery('#backoverlay').hide();
			jQuery('#show_popup').hide();
		};
		
		
	});
</script>
</head>
<body id="page_bg">
<!-- alert form -->
<style>
	img{border: none;}
	.bg_alert{ width:270px; height:115px; background:url("<?php echo JURI::base(); ?>templates/rhuk_milkyway/alert/img/bg_alert.png") no-repeat top left; margin:0px auto; padding:15px 0px 0px 83px; color:#000;}
	.m35l{ margin-left:35px;}
</style>
<div class="bg_alert" id="show_popup" style="display:none; position: fixed; top: 35%; left: 50%; z-index:10003; margin-left:-140px;">
	<span id="f_focus" style="display:none;"></span>
	<div style="margin:0; padding-top:10px; min-height:60px;" id="alert"></div>
	<div style="padding-left: <?php if($langtag == 'en-GB') echo '55px'; else echo '35px';?>"><a href="javascript:void(0);" onclick="close_popup();"> <img src="<?php echo JURI::base(); ?>templates/rhuk_milkyway/alert/img/bt_luk1<?php if($langtag == 'en-GB') echo '_en'; ?>.png" alt="" /></a></div>
</div>
<div style="display: none;position: fixed; top: 0;left: 0;width: 100%;height: 100%;background-color: #000000;z-index:10002;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);" id="backoverlay"></div>
<!-- end of alert form -->
<div class="wrapper">
    <div class="wrapper_inner">
    	<!-- header -->
        <div class="header">
		<div class="header_lang">
			<jdoc:include type="module" name="mod_jflanguageselection" />
		 </div>
            <div class="logo"><a href="Brunnogstengade_forside.html"><img src="<?php echo JURI::base(); ?>templates/rhuk_milkyway/images/logo.png" alt=""/></a></div>
            <div class="header_cart">
            	<!--<p>Shopping bag</p>
                <a href="Brunnogstengade_shopcart.html" class="top_link">3 items</a>
                <span><img src="<?php echo JURI::base(); ?>templates/rhuk_milkyway/images/dot.gif" alt=""/></span>
                <a href="Brunnogstengade_shopcart.html" class="top_link">Check out</a>-->
			<jdoc:include type="module" name="mod_virtuemart_cart"/>
            </div>
            <div class="clr"></div>
        </div>
        <!-- end header -->
        <!-- nav -->
        <div class="nav">
			<jdoc:include type="modules" name="user3" />
        </div>
        <!-- end nav -->
        <!-- container -->
			<jdoc:include type="component" />
        <!-- end container -->
        <!-- footer -->
        <div class="footer" style="font-size:12px!important; text-align:center;">
        	<?php echo $my_footer_info; ?>
        </div>
        <!-- end footer -->
    </div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("#demo1").webwidget_slideshow_dot({
			slideshow_time_interval: '5000',
			slideshow_window_width: '894',
			slideshow_window_height: '510',
			slideshow_title_color: '#17CCCC',
			soldeshow_foreColor: 'transparent',
			directory: '<?php echo JURI::base();?>templates/rhuk_milkyway/images/'
		});
	});
	
</script>
</body>
</html>
